-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type preservation #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some high-level comments.
…e (substitution lemma)
…y into type-preservation
The type preservation proof is closed! It required a few extra assumptions, in particular
Rudi says the former is very reasonable, but the implementation of function calls is so different from these formal semantics that the latter does not correspond directly. Additionally there are two admits in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Aqissiaq I think I see what the problem is. The finite maps we are using (FMaps
from Stdlib) are not extensional. That is, just because two finite maps m1
and m2
have the same elements, it's not necessarily the case that m1 = m2
. Instead Map.Equal
asserts something much weaker.
The easiest way to fix this is probably to switch to the extensional finite maps from the Std++ library, which are described here:
- https://coq-workshop.gitlab.io/2023/abstracts/coq2023_finmap-stdpp.pdf
- https://coq-workshop.gitlab.io/2023/slides/coq2023_krebbers.pdf
Then, your admits would be easy to fix.
Do you think we should do this before or after this PR is merged? Maybe it's easiest to merge this one first?
To give a more complete answer, we could stick to |
We should definitely switch to some more ergonomic maps and I have been happy with I will merge this one first and consider the type preservation part of #2 done for now, then open a new issue for the maps. |
Very much a WIP still, with some lemmas I am unsure about the formulation of, but I am a bit stuck and don't want to disappear into a fruitless rabbit hole of substitution properties.